Skip to content

feat: add /glean skill for cited company answers at minimal tool cost - #49

Closed
aditya-scio wants to merge 4 commits into
mainfrom
aditya/glean-skill
Closed

aditya-scio wants to merge 4 commits into
mainfrom
aditya/glean-skill

Conversation

@aditya-scio

@aditya-scio aditya-scio commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

Adds a short glean skill (invocable as /glean in Claude Code, Cursor, and Codex) that lets the agent default to Glean for company questions. It maps each question to the cheapest Glean tool that answers it (search, employee_search, meeting_lookup, memory, user_activity, read_document, chat), pushes for parallel calls and stopping early, and requires a source link for every claim, so answers stay high quality at the lowest token cost.

The Glean MCP server serves the same skill to MCP clients through skills/list.

npm test: all three targets build and validate, and the skill is emitted under dist/{claude,cursor,codex}.

@aditya-scio
aditya-scio marked this pull request as ready for review November 5, 2026 18:44
@aditya-scio
aditya-scio requested a review from a team as a code owner November 5, 2026 18:44
@steve-calvert-glean

Copy link
Copy Markdown
Contributor

@aditya-scio, this skill overlaps almost completely with using-glean, and I think it would be better to fold it in there than to ship a second skill.

  • Both descriptions trigger on the same questions: company docs, people, meetings, email, and the user's own work. search also triggers on "find the doc about". The host picks a skill from its description, so which one loads is unpredictable. When glean wins, the agent loses code_search, gmail_search, outlook_search, chat, knowledge_graph_query, the per-tool reference files, and the vetting rules.
  • The new guidance here is a few lines: run independent calls in parallel, retry at most twice, stop once answered, and flag stale or conflicting sources. Those fit well as cross-tool rules in shared/glean/skills/using-glean/SKILL.md.
  • The memory check for reading preferences runs on every question, which adds a call each time and works against the "fewest tool calls" goal.
  • The description promises email, but the body routes email to search. using-glean routes it to gmail_search and outlook_search.
  • The plugin is also named glean, so in Claude Code the command is /glean:glean, not /glean.
  • The PR description still lists chat, which a later commit dropped.

Could we add those rules to using-glean and close this PR? For the server-side skill, I'd like a single source text shared with using-glean, so the two copies don't drift apart.

One more thing: this repo is public, so please keep internal repo links and ticket keys out of PR descriptions, commits, and comments. I removed the internal PR links from the description.

@steve-calvert-glean

Copy link
Copy Markdown
Contributor

@aditya-scio, I folded this into using-glean in #51, so I'd like to close this one.

What carried over from this PR:

  • Run independent calls in parallel, and stop once the question is answered.
  • Retry a search at most twice, then say what you tried.
  • Say so when sources are stale or disagree.
  • Name only the tools that most deployments serve. This PR got that right, and using-glean didn't.

That last point became a rule for every skill. The server's tools/list is the only complete list of tools, and admins can remove toolsets. So skills now name search, read_document, chat and employee_search freely, and name any other Glean tool only with a fallback for when it is missing. A new check, npm run check:skill-tools, enforces this in CI.

I left out the memory check on every question, because it adds a call each time.

For the server-side glean skill, could it serve the same text as using-glean instead of a separate version? Then the two can't drift apart.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants